#include<graphics.h>
#include<conio.h>
#include<math.h>

#define High480
#define Width 640
#definePI3.14159

int main()
{
	initgraph(Width,High);
	int center_x,center_y;
	center_x=Width/2;
	center_y=High/2;
	int secondLength;
	secondLength=Width/5;
	
	int secondEnd_x,secondEnd_y;
	float seconfAngle;
	SYSTEMTIME ti;
	while(1)
	{
		GetLocalTime(&ti);
		secondAngle=ti.wSecond*2*PI/60;
		
		secondEnd_x=center_x+secondLength*sin(secondAngle);
		secondEnd_y=center_y-secondLength*cos(secondAngle);
	    setlinestyle(PS_SOLID,2);
	    setcolor(WHILE);
	    line(center_x,center_y,secondEnd_x,secondEnd_y);
	    sleep(100);
	    setcolor(WHILE);
	    line(center_x,center_y,secondEnd_x,second_y);
	}
	getch();
	closegraph();
	return 0;
}
